package levels
{
	import org.flixel.*;
	
	import states.GameState;
	import items.*;
	import enemies.*;
	import interactions.*;
	import treasures.*;
	import projectiles.Rock;
	
	/**
	 * ...
	 * @author JAC
	 */
	public class Tutorial_3 extends GameState
	{
		override public function create():void
		{
			super.create();
			
			_maze.load(MazeData.tutorial_3);
			
			Player.spawnAt(26, 13);
			
			Tracker.lives = 0;
			Tracker.mapScore = 1000;
			Tracker.minScore = 2;
			
			//addEntity(new RockThrow(13, 14));
			//addEntity(new RockThrow(15, 14));
			
			//addEntity(new RockThrow(14, 19));
			addEntity(new RockThrow(16, 19));
			addEntity(new RockThrow(18, 19));
			addEntity(new RockThrow(20, 19));
			addEntity(new RockThrow(22, 19));
			addEntity(new RockThrow(24, 19));
			
			addEntity(new LootBag(7, 7));
			addEntity(new LootBag(12, 7));
			addEntity(new LootBag(16, 7));
			addEntity(new LootBag(21, 7));
			
			addEntity(new Exorcist(0, 11));
			addEntity(new Exorcist(28, 3));
			
			gameStart();
		}
		
		override public function update():void
		{
			super.update();
			
			if (!_player.exists)
			{
				logGameEnd();
				FlxG.resetState();
			}
		}
	}
}